# -*- coding: utf-8 -*-
# Created by zhangyanqi on 2018/4/16

"""
请编写一个函数，其功能是将输入的字符串反转过来。
"""


class Solution:
    def reverseString(self, s):
        """
        :type s: str
        :rtype: str
        """
        result = ""
        for i in reversed(range(0, len(s))):
            result += s[i]
        return result


if __name__ == "__main__":
    s = Solution()
    string = s.reverseString("123")
    print(string)
